<?php
/* [$WindsForce] (C)Hunzhiwange.COM Since 2014.07.14.
   家居公司家装套餐列表($$)*/

!defined('Q_PATH') && exit;

class Package_C_Controller extends InitController{

	public function index(){
		$arrJiajucompany=$this->_oParent->_arrJiajucompany;
		
		Core_Extend::getSeo($this,array(
			'title'=>"{$arrJiajucompany['jiajucompany_fullname']}家装套餐",
			'keywords'=>"{$arrJiajucompany['jiajucompany_fullname']}套餐,{$arrJiajucompany['jiajucompany_fullname']}套餐价格,{$arrJiajucompany['jiajucompany_fullname']}套餐折扣",
			'description'=>"通过{$GLOBALS['_option_']['site_name']}您可以及时准确的了解{$arrJiajucompany['jiajucompany_fullname']}的最新套餐折扣、套餐价格等。",
		));

		// 套餐列表
		$arrWhere=array();
		$arrWhere['jiajupackage_status']=1;
		$arrWhere['jiajucompany_id']=$arrJiajucompany['jiajucompany_id'];

		$nTotal=Model::F_('jiajupackage')->where($arrWhere)->getCounts();
		$oPage=Page::RUN($nTotal,16,Jiaju_Extend::getVideopageUrl($arrJiajucompany,false));
		$arrPackages=Model::F_('jiajupackage')
			->setColumns('jiajupackage_id,jiajupackage_title,jiajupackage_thumb,jiajupackage_price,jiajupackage_firstprice')
			->where($arrWhere)
			->order('jiajupackage_id DESC')
			->limit($oPage->S(),$oPage->N())
			->getAll();

		$this->assign('arrPackages',$arrPackages);
		$this->assign('nTotalPackage',$nTotal);
		$this->assign('sPageNavbar',$oPage->P(array('id'=>'pagination','style'=>'li','current'=>'active')));
		$this->display(Jiaju_Extend::getTemplate($arrJiajucompany,'package'));
	}

}
